package utils.enums;

/**
 * 业务代码
 * @author guogf
 *
 */
public enum BusinCodeEnum {
	HB("100","还本(融资人)"),HX("101","还息(融资人)"),KSSXF("102","扣收手续费"),ZSCZ("103","赠送充值"),
	TX("104","提现"),FYZJ("105","费用结转"),ZJDJ("106","资金冻结"),ZJJD("107","资金解冻"),
	CZ("301","充值"),CZQS("501","充值清算(到托管户)"),TXQS("502","提现清算(扣减托管户)"),
	JX("503","结息(托管账户)"),CC("999","冲正");
	private String key; 
	private String value; 
	
	private BusinCodeEnum(String type, String desc) { 
		key = type;
		value = desc;
	}

	public String getKey() {
		return key;
	}
	public String getValue() {
		return value;
	}

	public static BusinCodeEnum getInstance(String s) {
		BusinCodeEnum[] allStatus = BusinCodeEnum.values();
		for (BusinCodeEnum ws : allStatus) {
			if (ws.getKey().equalsIgnoreCase(s)) {
				return ws;
			}
		}
		throw new IllegalArgumentException("值非法，没有符合业务代码的枚举对象");
	} 
}
